<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>join</title>
</head>
<body>
<script>
    var arr = ["a", "b", "c"];
    var result1 = arr.join();

    var result2 = arr.join("-"); // 使用指定的字符串作为连接符
    console.log(typeof arr);
    console.log(typeof result1);

    console.log("arr =" + JSON.stringify(arr));
    console.log("result1 =" + JSON.stringify(result1));
    console.log("result2 =" + JSON.stringify(result2));
</script>
</body>
</html>